#ifndef _HEAD_H
#define _HEAD_H

//typedef struct desc_struct{
//	unsigned long a, b;
//}desc_table[256];

struct desc_struct{
  union {
    struct {
      unsigned int a;
      unsigned int b;
    };  
    struct {
      unsigned short limit0;
      unsigned short  base0;
      unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1;
      unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8;
    };  
  }; 
}__attribute__((packed));

extern unsigned long kp_dir[];
extern struct desc_struct gdt[256], idt[256];

extern unsigned long _text;
extern unsigned long _etext;
extern unsigned long _data;
extern unsigned long _edata;
extern unsigned long _bss;
extern unsigned long _ebss;
extern unsigned long _end;

#endif
